// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	1/5/2014 9:51:29 PM				
// -----------------------------

#ifndef _CMath_h
#define _CMath_h

#include "Defines.h"
 
namespace Flow
{

	struct Vector4;

	class Math
	{
	public:

		static const Float	Pi;
		static const Float	PiOver2;
		static const Float	PiTimes2;
		static const Float	PiOver4;
		static const Float	PiTimes4;
		static const Float	Epsilon;

		static Float	Lerp(Float a, Float b, Float alpha);

		static Float	Sin(Float fAngle);
		static Float	Cos(Float fAngle);
		static Float	Tan(Float fAngle);

		static Float	Sqrt(Float fValue);

		static Float	Deg2Rad(Float fDegrees);
		static Float	Rad2Deg(Float fRadians);

		static Float	Abs(Float fValue);
		static Int32	Abs(Int32 iValue);

		static Float	Pow(Float a, Float exp);
		static Float	Pow(Float a, Int32 exp);

		static Float	Min(Float a, Float b);
		static UInt32	Min(UInt32 a, UInt32 b);
		static Int32	Min(Int32 a, Int32 b);

		static Float	Max(Float a, Float b);
		static UInt32	Max(UInt32 a, UInt32 b);
		static Int32	Max(Int32 a, Int32 b);

		static Float	Clamp(Float a, Float min = 0.0f, Float max = 1.0f);
		static Float	Floor(Float a);
		static Float	Ceil(Float a);

		static Float	Mod(Float a, Float mod);
		static Float	WrapUniform(Float a);

	private:

		Math();
		~Math();
		Math(const Math& refMath);
		Math& operator=(const Math& refMath);
	};

}

#endif